package com.jsits.v2x.common.util;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

public class JsonUtil
{
	public static String obj2Json(Object obj)
	{
		return JSON.toJSONString(obj, SerializerFeature.DisableCircularReferenceDetect);
	}

	public static <T> T json2Obj(String json, Class<T> klass)
	{
		return JSON.parseObject(json, klass);
	}

}
